
using System.Collections;
using QdbUnit.Fixtures;
using Qdb.Foundation;

namespace QdbUnit.Fixtures
{
	public class MultiValueFixtureProvider : IFixtureProvider
	{
		public static object[] Value()
		{
			return (object[])_variable.Value;
		}

		private static readonly FixtureVariable _variable = new FixtureVariable("data");

		private readonly object[][] _values;

		public MultiValueFixtureProvider(object[][] values)
		{
			_values = values;
		}

		public virtual FixtureVariable Variable()
		{
			return _variable;
		}

		public virtual IEnumerator GetEnumerator()
		{
			return Iterators.Iterate(_values);
		}
	}
}
